<?php

namespace App\Models;

use App\Models\airline\base\BanModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model as BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

//仓库 上板管理
class DepotBanItemModel extends BaseModel
{
    use HasFactory;

    protected $table = 't_depot_ban_item';

    protected $primaryKey = 'id';

    public $timestamps = false;

    const CREATED_AT = null;
    
    const UPDATED_AT = null;

    protected $guarded = [];

    protected $hidden = [
    ];

    //创建人
    public function create_admin(): BelongsTo {
        return $this->belongsTo(AdminModel::class, 'created_admin_id');
    }

    //入仓单
    public function order(): BelongsTo {
        return $this->belongsTo(OrderModel::class, 'order_id');
    }

    //板
    public function ban(): BelongsTo {
        return $this->belongsTo(BanModel::class, 'ban_id');
    }

}
